﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Ins.Packaging;

namespace Ins.Office
{
    /// <summary>
    /// Provides defaulot settings for Excel packages.
    /// </summary>
    /// <remarks>
    /// This class contains namespaces, relation types, and content types required for Excel packages processing.
    /// This class cannot be inherited.
    /// </remarks>
    public sealed class XLPackageSettings : PackageSettings
    {

        /// <summary>
        /// The default namespace for Excel packages.
        /// </summary>
        public const string DefaultNS = @"http://schemas.openxmlformats.org/spreadsheetml/2006/main";
        /// <summary>
        /// The relationship namespace for Excel packages.
        /// </summary>
        public const string RelationshipNS = @"http://schemas.openxmlformats.org/officeDocument/2006/relationships";

        /// <summary>
        /// The relationship type for Excel worksheets.
        /// </summary>
        public const string WorksheetRelationType = @"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet";
        /// <summary>
        /// The relationship type for shared strings.
        /// </summary>
        /// <remarks>
        /// The shared strings is a special Excel resource used for storing and indexing strings.
        /// The worksheet does not contain string data, but indexes that point to locations in the shared strings dictionary.
        /// </remarks>
        public const string SharedStringsRelationType = @"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings";

        /// <summary>
        /// The worksheet content type, required when creating worksheet parts.
        /// </summary>
        public const string WorksheetContentType = @"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml";
        /// <summary>
        /// The shared strings content type, required when creating shared strings parts.
        /// </summary>
        public const string SharedStringsContentType = @"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml";

        /// <summary>
        /// Initializes a new instance of the XLPackageSettings object.
        /// </summary>
        /// <remarks>
        /// The package relation type is overriden to the corresponding value for Excel documents.
        /// </remarks>
        public XLPackageSettings()
        {
            PackageRelationshipType = @"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
        }
    }
}
